package com.gxa.entity.commnotice;

import com.baomidou.mybatisplus.annotation.*;

import java.io.Serializable;
import java.util.*;

import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.AllArgsConstructor;
import lombok.Getter;
import lombok.NoArgsConstructor;
import lombok.Setter;
import lombok.experimental.Accessors;

/**
 * <p>
 * 公告通知
 * </p>
 *
 * @author yjl
 * @since 2022-10-13 07:51:20
 */
@Getter
@Setter
@AllArgsConstructor
@NoArgsConstructor
@Accessors(chain = true)
@TableName("t_notice")
@ApiModel(value = "Notice对象", description = "公告通知")
public class Notice implements Serializable {

    private static final long serialVersionUID = 1L;

    @ApiModelProperty("通知公告id")
    @TableId(value = "id", type = IdType.AUTO)
    private Integer id;

    @ApiModelProperty("公告标题")
    @TableField("notice_title")
    private String noticeTitle;

    @ApiModelProperty("公告内容")
    @TableField("notice_content")
    private String noticeContent;

    @ApiModelProperty("开始时间")
    @TableField("notice_start_time")
    private Date noticeStartTime;

    @ApiModelProperty("结束时间")
    @TableField("notice_end_time")
    private Date noticeEndTime;

    @ApiModelProperty("公告发布人")
    @TableField("notice_publisher")
    private String noticePublisher;

    @ApiModelProperty("公告发布时间")
    @TableField("creation_time")
    private Date creationTime;

    @ApiModelProperty("状态（0-发布中，1-已完成，2-已撤销）")
    @TableField("notice_state")
    private Integer noticeState;

    @ApiModelProperty(value = "0-正常，1-删除",hidden = true)
    @TableField("is_delete")
    @TableLogic
    private Integer isDelete;

//    @ApiModelProperty("状态（0-发布中，1-已完成，2-已撤销）")
//    @TableField(exist = false)
//    private HashMap<Integer,String> noticeStateNames;

//    void init(){
//        this.noticeStateNames = new HashMap() {
//        };
//        noticeStateNames.put(0,"发布中");
//        noticeStateNames.put(1,"已完成");
//        noticeStateNames.put(2,"已撤销");
//    }
}
